//根据QueryString参数名称获取值
function getQueryStringByName(name) {

    var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
    if (result == null || result.length < 1) {

        return "";

    }
    return decodeURIComponent(result[1]);

}

/**
 * @return {string}
 */
function GetQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null)
        return decodeURIComponent(r[2]);
    return null;
}

// 删除parentDom所有子节点
function removeAllChild(parentDom) {
    let childs = parentDom.childNodes;//childNodes所有的子节点
    for (let i = childs.length - 1; i >= 0; i--) {
        parentDom.removeChild(childs[i]);
    }
}
